package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/prop")
@RestController
public class PropertiesController {
    @Value("${spring.datasource.url}")
    private String url;
    @Value("${characterEncoding}")
    private String charEncoding;
    @Value("${spring.datasource.username}")
    private String username;
    @Value("${spring.datasource.username}")
    private String password;
    @RequestMapping("/info")
    public String info(){
        return url + ", " + charEncoding + ", " + username + ", " + password;
    }
}
